<?php
class CV_Datastore_Metadata_Model_Provider_Relational_Class implements ArrayAccess{
	function __construct( $metadata ){
		$this->table = $metadata;
		$this->fields = array();
		foreach( $metadata->get_columns() as $name => $column ){
			$this->fields[$name] = new CV_Datastore_Metadata_Model_Provider_Relational_Field( $column, $this );
		}
	}
	function get_fields(){
		return $this->fields;
	}
	function get_name(){
		return $this->table->get_name();			
	}
	function offsetSet( $name, $value ){
	}
	function offsetExists( $name ){
		return isset($this->fields[$name]);
	}
	function offsetUnset( $name ){
	}
	function offsetGet( $name ){
		return $this->fields[$name]; 
	}
}